package uc108.com.jetpackdemo.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

import java.util.List;

import uc108.com.jetpackdemo.room.Game;

public class GameViewModel extends AndroidViewModel {
    public GameViewModel(@NonNull Application application) {
        super(application);
    }

    MutableLiveData<List<Game>> mutableLiveData = new MutableLiveData<>();

    public void setData(List<Game> list) {
        mutableLiveData.setValue(list);
    }

    public MutableLiveData<List<Game>> getDatas() {
        return mutableLiveData;
    }
}
